-- 生成二维简单粒子域
-- @note 4*4*2 = 32
function region()
    local loc = {}
    local vel = {}
    local mass = {}
    local rho = {}
    local p = {}
    local u = {}
    local itype = {}
    local nreal = 5 * 5

    loc[1] = {}
    loc[2] = {}
    vel[1] = {}
    vel[2] = {}

    -- 将 1 m 分为 5 等分
    local dx = 0.20
    for i = 1, 5, 1 do
        for j = 1, 5, 1 do
            local k = j + (i - 1) * 5
            loc[1][k] = (i - 1) * dx + dx / 2
            loc[2][k] = (j - 1) * dx + dx / 2
        end
    end

    local c = 1
    for i = 1, nreal, 1 do
        vel[1][i] = 0
        vel[2][i] = 0
        p[i] = 0
        rho[i] = 1000
        mass[i] = rho[i] * dx * dx
        u[i] = 0
        itype[i] = 2
    end

    return loc, vel, mass, rho, p, u, itype, dx, nreal, 0

end
